<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<c:choose>
    <c:when test="${not empty messageList}">
        <c:forEach items="${messageList}" var="item" varStatus="status">

            <div class="newsBlock">
                <div class="newsHeader">
                        ${item.header}
                <span class="newsDate">
                    <fmt:formatDate value="${item.createDate}" pattern="dd.MM.yyyy" />
                </span>
                </div>
                <div class="newsContent">
                        ${item.message}
                </div>
            </div>

        </c:forEach>
    </c:when>
    <c:otherwise>
        <div class="newsBlock">
            [Нет записей]
        </div>
    </c:otherwise>
</c:choose>
